<include file="__PUBLIC__/header"/>
<div class="page-container">
    <!--菜单-->
    <div class="cl pd-5 bg-1 bk-gray mt-10 mb-10">
        <span class="l">
            <a href="javascript:;" onclick="qz_layer_open('新增模型','{|U:'add'}')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 新增</a>
            <a href="javascript:;" onclick="forbid_all('{|U:'Admin/Model/changeStatus/method/forbid'}')" class="btn btn-warning radius ml-5"><i class="Hui-iconfont">&#xe631;</i> 禁用</a>
<a href="javascript:;" onclick="resume_all('{|U:'Admin/Model/changeStatus/method/resume'}')" class="btn btn-success radius ml-5"><i class="Hui-iconfont">&#xe615;</i> 启用</a>
            <a href="javascript:;" onclick="ajax_req('{|U:'updateCache'}');" class="btn btn-default radius ml-5"><i class="iconfont icon-qingchuhuancun"></i> 更新模型缓存</a>
        </span>
        <span class="r" style="line-height:1.6em;margin-top:3px"></span>
    </div>
    <!--列表-->
    <table class="table table-border table-bordered table-bg mt-10 table-sort" id="table">
        <thead>
        <tr class="text-c">
            <th><input type="checkbox" name="" value=""></th>
            <th>ID</th>
            <th>模型名称</th>
            <th>主表</th>
            <th>系统模型</th>
            <th>前台投稿</th>
            <th>状态</th>
            <th width="130">操作</th>
        </tr>
        </thead>
        <tbody>
        <list from="$model" name="$qz">
            <tr class="text-c">
                <td><input type="checkbox" name="id[]" value="{$qz.id}"></td>
                <td>{$qz.id}</td>
                <td>{$qz.model_name}</td>
                <td>{$qz.table_name}</td>
                <td>
                    <if value='$qz.is_system eq 1'>
                        <span class="c-red">√</span>
                        <else/>
                        <span class="c-blue">×</span>
                    </if>
                </td>

                <td>
                    <if value='$qz.contribute eq 1'>
                        <span class="c-red">√</span>
                        <else/>
                        <span class="c-blue">×</span>
                    </if>
                </td>
                <td>
                    {$qz.enable_text}
                </td>
                <td class="text-l">
                    <a href="{|U:'Field/index',array('mid'=>$qz['id'])}" class="label label-secondary radius">字段管理</a>
                    <a title="编辑" href="javascript:;" onclick="qz_layer_open('编辑模型','{|U:'edit',array('id'=>$qz['id'])}')" class="label label-primary radius"><i class="Hui-iconfont">&#xe6df;</i></a>
                    <if value="$qz.is_system==0">
                    <a title="删除" href="javascript:;" onclick="del_forever(this,'{$qz['id']}','{|U:'del'}')" class="label label-danger radius"><i class="Hui-iconfont">&#xe6e2;</i></a>
                    </if>
                </td>
            </tr>
        </list>
    </table>
</div>
<include file="__PUBLIC__/footer"/>
</body>
</html>